using System.Xml.Serialization;
using LinqToDB;
using LinqToDB.Mapping;
using NalogGarLoader.Data.Tables.GarEntries;

namespace NalogGarLoader.Data.Tables.GarEntries.ReferenceTables;

#nullable disable

[XmlRoot("PARAMTYPE")]
[Table(GarTypes.AS_PARAM_TYPES)]
public class ParamType : GarEntryBase
{
    [XmlAttribute("ID")]
    [PrimaryKey]
    public int Id { get; set; }

    [XmlAttribute("NAME")]
    [Column(DataType = DataType.NVarChar, Length = 50)]
    public string Name { get; set; }

    [XmlAttribute("DESC")]
    [Column(DataType = DataType.NVarChar, Length = 120)]
    public string Desc { get; set; }

    [XmlAttribute("CODE")]
    [Column(DataType = DataType.NVarChar, Length = 50)]
    public string Code { get; set; }

    [XmlAttribute("ISACTIVE")]
    [Column]
    public bool IsActive { get; set; }

    [XmlAttribute(AttributeName = "UPDATEDATE", DataType = "date")]
    [Column(DataType = DataType.Date)]
    public DateTime UpdateDate { get; set; }

    [XmlAttribute(AttributeName = "STARTDATE", DataType = "date")]
    [Column(DataType = DataType.Date)]
    public DateTime StartDate { get; set; }

    [XmlAttribute(AttributeName = "ENDDATE", DataType = "date")]
    [Column(DataType = DataType.Date)]
    public DateTime EndDate { get; set; }
}